cmake_minimum_required(VERSION 3.14)

project(docker-analyzer LANGUAGES CXX VERSION 0.0.2)

include(cmake/SparkWithGit.cmake)
spark_initialize_modules()

# 资源文件路径
set(QRC_SOURCES "")

spark_add_executable_path(${PROJECT_NAME} 
    src
    src/manager
    ${QRC_SOURCES}
)
target_link_qt5(${PROJECT_NAME})

spark_framework_include_with_git(${PROJECT_NAME} 
    https://gitee.com/spark-framework-libs/spark-framework-features
    FEATURES version screenutil)

# 测试示例
add_subdirectory(tests)

# 内容默认应用名称: Name= 应与项目名称相同
spark_desktop_macros(
    # 应用名称: Name=
    "${PROJECT_NAME}" 
    # 应用名称: Name[zh_CN]=
    "Docker 分析工具" 
    # 应用说明: Comment=
    "一个可以帮助您了解 Docker 信息的分析器" 
    # 应用类型: Type=
    "Application" 
    # 执行程序: Exec=
    "/usr/bin/${PROJECT_NAME}" 
    # 图标路径: Icon=
    "/usr/share/${PROJECT_NAME}/icon.png" 
    # 应用分类: Category=
    "Utility" 
    # MIME类型: MimeType=
    ""
)
install(TARGETS ${PROJECT_NAME}
    DESTINATION /usr/bin)
install(FILES assets/icon.png
    DESTINATION /usr/share/${PROJECT_NAME})
install(FILES ${SPARK_DESKTOP_FILE}
    DESTINATION /usr/share/applications)

# 注释行(使用方式)
add_package_descript(cmake/spark-deb-package.descript)
